/*
 * Copyright (c) 2011, Marc-Andre Ferland - madrang@gmail.com
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the The Warrent Team nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *     * This software is free for non-commercial use. You may not use this
 *       software, in whole or in part, in support of any commercial product
 *       without the express consent of the author.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE WARRENT TEAM BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
using System;

namespace OsHelper.UsbNet.Descriptors
{
	/// <summary>
	/// Device and/or Interface Class codes.
	/// </summary>
	/// <remarks>
	/// If equal to Zero, each interface specifies it’s own class code.
	/// If equal to 0xFF, the class code is vendor specified.
	/// Otherwise field is valid Class Code.
	/// </remarks>
	[Flags]
	public enum ClassCodeType : byte
	{
		/// <summary>
		/// Device class is unspecified.
		/// Interface descriptors are used for determining the required drivers.
		/// </summary>
		Unspecified = 0x00,

		/// <summary>
		/// Audio
		/// </summary>
		/// <example>
		/// Speaker, microphone, sound card, MIDI
		/// </example>
		Audio = 0x01,

		/// <summary>
		/// Communications class
		/// </summary>
		/// <example>
		/// Modem, Ethernet adapter, Wi-Fi adapter
		/// </example>
		Communications = 0x02,

		/// <summary>
		/// Human interface device (HID) class
		/// </summary>
		/// <example>
		/// Keyboard, mouse, joystick
		/// </example>
		HumanInterfaceDevice = 0x03,

		/// <summary>
		/// Physical Interface Device (PID)
		/// </summary>
		/// <example>
		/// Force feedback joystick
		/// </example>
		PhysicalInterfaceDevice = 0x05,

		/// <summary>
		/// Picture transfer protocol class
		/// </summary>
		/// <example>
		/// Scanner
		/// </example>
		Image = 0x06,

		/// <summary>
		/// Printer class
		/// </summary>
		/// <example>
		/// Laser printer, inkjet printer, CNC machine
		/// </example>
		Printer = 0x07,

		/// <summary>
		/// Mass storage class
		/// </summary>
		/// <example>
		/// USB flash drive, memory card reader, digital audio player, digital camera, external drive
		/// </example>
		MassStorage = 0x08,

		/// <summary>
		/// Hub class
		/// </summary>
		/// <example>
		/// Full bandwidth hub
		/// </example>
		Hub = 0x09,

		/// <summary>
		/// Data class
		/// </summary>
		/// <remarks>
		/// This class is used together with class Communications.
		/// </remarks>
		Data = 0x0A,

		/// <summary>
		/// USB smart card reader
		/// </summary>
		SmartCard = 0x0B,

		/// <summary>
		/// Content security
		/// </summary>
		/// <example>
		/// Fingerprint reader
		/// </example>
		ContentSecurity = 0x0D,

		/// <summary>
		/// Video
		/// </summary>
		/// <example>
		/// Webcam
		/// </example>
		Video = 0x0E,

		/// <summary>
		/// Personal Healthcare
		/// </summary>
		/// <example>
		/// Pulse monitor (watch)
		/// </example>
		PersonalHealthcare = 0x0F,

		/// <summary>
		/// Diagnostic Device
		/// </summary>
		/// <example>
		/// USB compliance testing device
		/// </example>
		DiagnosticDevice = 0xDC,

		/// <summary>
		/// Wireless Controller
		/// </summary>
		/// <example>
		/// Bluetooth adapter, Microsoft RNDIS
		/// </example>
		WirelessController = 0xE0,

		/// <summary>
		/// Miscellaneous
		/// </summary>
		/// <example>
		/// ActiveSync device
		/// </example>
		Miscellaneous = 0xEF,

		/// <summary>
		/// Application-specific
		/// </summary>
		/// <example>
		/// IrDA Bridge, Test & Measurement Class (USBTMC), USB DFU (Direct Firmware update)
		/// </example>
		ApplicationSpecific = 0xFE,

		/// <summary>
		/// Class is vendor-specific
		/// </summary>
		/// <example>
		/// This class code indicates that the device needs vendor specific drivers.
		/// </example>
		VendorSpecific = 0xFF
	}
}
